<html>
	<head>
		<meta charset="utf-8"/>
		<title>BStyle</title>
		<link rel="stylesheet" type="text/css" href="../style.css"/>
	</head>
	<body>
		<h1>BStyle</h1>
		<p>Inherites from <a href="BObject.html">BObject</a></p>
		<h2>public</h2>
		<table id="public">
			<tr><td align="right"/><td><a href="#BStyle()">BStyle</a>();</td></tr>
			<tr><td align="right"/><td><a href="#BStyle(const BColor&)">BStyle</a>(const BColor& color);</td></tr>
			<tr><td align="right"/><td><a href="#BStyle(const BStyle&)">BStyle</a>(const BStyle& other);</td></tr>
			<tr><td align="right">void </td><td><a href="#setFont(BFont*)">setFont</a>(BFont* font);</td></tr>
			<tr><td align="right">const BFont* </td><td><a href="#font()">font</a>() const;</td></tr>
			<tr><td align="right">bool </td><td><a href="#addSub(BStyle*)">addSub</a>(BStyle* style);</td></tr>
			<tr><td align="right">BStyle* </td><td><a href="#sub(const BString&)">sub</a>(const BString& name);</td></tr>
			<tr><td align="right">const BStyle* </td><td><a href="#sub(const BString&)">sub</a>(const BString& name) const;</td></tr>
			<tr><td align="right">void </td><td><a href="#setValue(StyleRole, const BValue&)">setValue</a>(StyleRole valueRole, const BValue& value);</td></tr>
			<tr><td align="right">bool </td><td><a href="#removeVlaue(StyleRole)">removeVlaue</a>(StyleRole valueRole);</td></tr>
			<tr><td align="right">const BValue& </td><td><a href="#value(StyleRole)">value</a>(StyleRole valueRole) const;</td></tr>
			<tr><td align="right">bool </td><td><a href="#setColor(StyleRole, BByte, BByte, BByte,BByte)">setColor</a>(StyleRole colorRole, BByte r, BByte g, BByte b, BByte a = 255);</td></tr>
			<tr><td align="right">bool </td><td><a href="#setColor(StyleRole, const BColor&)">setColor</a>(StyleRole colorRole, const BColor& color);</td></tr>
			<tr><td align="right">bool </td><td><a href="#removeColor(StyleRole)">removeColor</a>(StyleRole colorRole);</td></tr>
			<tr><td align="right">const BColor& </td><td><a href="#color(StyleRole)">color</a>(StyleRole colorRole) const;</td></tr>
			<tr><td align="right">bool </td><td><a href="#setImage(StyleRole, const BString&)">setImage</a>(StyleRole imageRole, const BString& fileName);</td></tr>
			<tr><td align="right">bool </td><td><a href="#setImage(StyleRole, BImage*)">setImage</a>(StyleRole imageRole, BImage* image);</td></tr>
			<tr><td align="right">bool </td><td><a href="#removeImage(StyleRole)">removeImage</a>(StyleRole imageRole);</td></tr>
			<tr><td align="right">BImage* </td><td><a href="#image(StyleRole)">image</a>(StyleRole imageRole) const;</td></tr>
			<tr><td align="right">bool </td><td><a href="#setIcon(StyleRole, const BString&)">setIcon</a>(StyleRole iconRole, const BString& fileName);</td></tr>
			<tr><td align="right">bool </td><td><a href="#setIcon(StyleRole, BIcon*)">setIcon</a>(StyleRole iconRole, BIcon* icon);</td></tr>
			<tr><td align="right">bool </td><td><a href="#removeIcon(StyleRole)">removeIcon</a>(StyleRole iconRole);</td></tr>
			<tr><td align="right">BIcon* </td><td><a href="#icon(StyleRole)">icon</a>(StyleRole iconRole) const;</td></tr>
			<tr><td align="right">bool </td><td><a href="#setTrans(const BString&, const BString&)">setTrans</a>(const BString& word, const BString& trans);</td></tr>
			<tr><td align="right">bool </td><td><a href="#removeTrans(const BString&)">removeTrans</a>(const BString& word);</td></tr>
			<tr><td align="right">bool </td><td><a href="#trans(const BString&, BString&)">trans</a>(const BString& text, BString& output) const;</td></tr>
			<tr><td align="right">bool </td><td><a href="#setColor(const BString&, BByte, BByte, BByte,BByte)">setColor</a>(const BString& colorName, BByte r, BByte g, BByte b, BByte a = 255);</td></tr>
			<tr><td align="right">bool </td><td><a href="#setColor(const BString&, const BColor&)">setColor</a>(const BString& colorName, const BColor& color);</td></tr>
			<tr><td align="right">bool </td><td><a href="#removeColor(const BString&)">removeColor</a>(const BString& colorName);</td></tr>
			<tr><td align="right">const BColor& </td><td><a href="#color(const BString&)">color</a>(const BString& colorName) const;</td></tr>
			<tr><td align="right">bool </td><td><a href="#setImage(const BString&, const BString&)">setImage</a>(const BString& imageName, const BString& fileName);</td></tr>
			<tr><td align="right">bool </td><td><a href="#setImage(const BString&, BImage*)">setImage</a>(const BString& imageName, BImage* image);</td></tr>
			<tr><td align="right">bool </td><td><a href="#removeImage(const BString&)">removeImage</a>(const BString& imageName);</td></tr>
			<tr><td align="right">BImage* </td><td><a href="#image(const BString&)">image</a>(const BString& imageName) const;</td></tr>
			<tr><td align="right">bool </td><td><a href="#setIcon(const BString&, const BString&)">setIcon</a>(const BString& iconName, const BString& fileName);</td></tr>
			<tr><td align="right">bool </td><td><a href="#setIcon(const BString&, BIcon*)">setIcon</a>(const BString& iconName, BIcon* icon);</td></tr>
			<tr><td align="right">bool </td><td><a href="#removeIcon(const BString&)">removeIcon</a>(const BString& iconName);</td></tr>
			<tr><td align="right">BIcon* </td><td><a href="#icon(const BString&)">icon</a>(const BString& iconName) const;</td></tr>
			<tr><td align="right">bool </td><td><a href="#clearFrames()">clearFrames</a>();</td></tr>
			<tr><td align="right">bool </td><td><a href="#clearColors()">clearColors</a>();</td></tr>
			<tr><td align="right">void </td><td><a href="#clearImages()">clearImages</a>();</td></tr>
			<tr><td align="right">void </td><td><a href="#clearIcons()">clearIcons</a>();</td></tr>
		</table>
		<h2>protected</h2>
		<table id="protected"/>
		<div id="desc">
			<h2>Detailed Description : </h2>
			<p>BWE Style Sheets are a simple mechanism that allows you to customize the appearance of widgets,. The concepts, terminology, and syntax of BWE Style Sheets are heavily inspired by HTML Cascading Style Sheets (CSS) and Qt Style Sheet but simplified a lot.</p>
			<p>Styles sheets are textual specifications that can be set on the whole application using QApplication::setStyleSheet() or on a specific widget using QWidget::setStyleSheet(). If several style sheets are set at different levels, BWE derives the effective style sheet from all of those that are set.</p>
			<p>BStyle contains colors, icons, images, fonts and trans. These are maped by integer number or string name. </p>
			<p>Application has basic style initialized when BApplication is Initialized.Every widget call has a Style. </p><table><tr><td>background</td><td>equals background-normal, background color for normal state.</td><td/></tr><tr><td>color</td><td>equals color-normal, text color while state is normal.used by macro Color_Text.</td><td/></tr><tr><td>color-hovered</td><td>text color for hovered state. used by macro Color_Text_Hovered.</td><td/></tr><tr><td>color-pressed</td><td>text color for pressed state. used by macro Color_Text_Pressed.</td><td/></tr><tr><td>color-disable</td><td>text color for disable state, used by macro Color_Text_Disable.</td><td/></tr><tr><td>border</td><td>widget's border size, used by macro Value_Border.</td><td/></tr><tr><td>border-color</td><td>equals border-color-normal, widget's border color, used by macro Color_Border.</td><td/></tr><tr><td>border-color-hovered</td><td>widget's border color for hovered state, used by macro Color_Border_Hovered.</td><td/></tr><tr><td>border-color-pressed</td><td>widget's border color for pressed state,used by macro Color_Border_Pressed.</td><td/></tr><tr><td>border-color-checked</td><td/><td/></tr><tr><td>border-color-disable</td><td/><td/></tr><tr><td>perch</td><td>set perchs size, split by ',' eg perch:1px, 2px, 3, 4, means left is 1px, right is 2px.</td><td/></tr><tr><td>perch-left</td><td>set perch left size, used by macro Value_Perch_Left.</td><td/></tr><tr><td>perch-right</td><td>set perch right size, used by macro Value_Perch_Right.</td><td/></tr><tr><td>perch-top</td><td>set perch top size, used by macro Value_Perch_Top.</td><td/></tr><tr><td>perch-bottom</td><td>set perch bottom size, used by macro Value_Perch_Bottom.</td><td/></tr><tr><td>perch-color</td><td>equals perch-color-normal, is widget's perch color. used by macro Color_Perch.</td><td/></tr><tr><td>perch-color-hovered</td><td>widget's perch color for hovered state, used by macro Color_Perch_Hovered.</td><td/></tr></table>
		</div>
		<h2 id="docs">Member Function Documentation</h2>
		<div id="BStyle()">
			<h3>BStyle();</h3>
			<p>Constructs a Style object, style is empty.</p>
		</div>
		<div id="BStyle(const BColor&)">
			<h3>BStyle(const BColor& color);</h3>
			<p>Constructs a Style object with special color, style will initialized many colors.</p>
		</div>
		<div id="BStyle(const BStyle&)">
			<h3>BStyle(const BStyle& other);</h3>
			<p>Copy construct with another style object.</p>
		</div>
		<div id="setFont(BFont*)">
			<h3>void setFont(BFont* font);</h3>
			<p>Set font of style, till now a style has only one font.</p>
		</div>
		<div id="font()">
			<h3>const BFont* font() const;</h3>
			<p>Get font in style object.</p>
		</div>
		<div id="addSub(BStyle*)">
			<h3>bool addSub(BStyle* style);</h3>
			<p>Style object can hold a lot of sub style objects. Usually used by internal sub widgets. eg BComboBox sub button.</p>
		</div>
		<div id="sub(const BString&)">
			<h3>BStyle* sub(const BString& name);</h3>
			<p>Get sub style object by name.</p>
		</div>
		<div id="sub(const BString&)">
			<h3>const BStyle* sub(const BString& name) const;</h3>
			<p>Get sub style object by name.</p>
		</div>
		<div id="setValue(StyleRole, const BValue&)">
			<h3>void setValue(StyleRole valueRole, const BValue& value);</h3>
			<p>Setup a Map integer with value.</p>
		</div>
		<div id="removeVlaue(StyleRole)">
			<h3>bool removeVlaue(StyleRole valueRole);</h3>
			<p>Remove a value mapped by integer valueRole.</p>
		</div>
		<div id="value(StyleRole)">
			<h3>const BValue& value(StyleRole valueRole) const;</h3>
			<p>Return a value mapped by integer valueRole.</p>
		</div>
		<div id="setColor(StyleRole, BByte, BByte, BByte,BByte)">
			<h3>bool setColor(StyleRole colorRole, BByte r, BByte g, BByte b, BByte a = 255);</h3>
			<p>Setup a map of colorRole and Color(r, g, b, a). </p>
		</div>
		<div id="setColor(StyleRole, const BColor&)">
			<h3>bool setColor(StyleRole colorRole, const BColor& color);</h3>
			<p>Setup a map of colorRole and color.</p>
		</div>
		<div id="removeColor(StyleRole)">
			<h3>bool removeColor(StyleRole colorRole);</h3>
			<p>Remove color mapped by colorRole.</p>
		</div>
		<div id="color(StyleRole)">
			<h3>const BColor& color(StyleRole colorRole) const;</h3>
		</div>
		<div id="setImage(StyleRole, const BString&)">
			<h3>bool setImage(StyleRole imageRole, const BString& fileName);</h3>
		</div>
		<div id="setImage(StyleRole, BImage*)">
			<h3>bool setImage(StyleRole imageRole, BImage* image);</h3>
		</div>
		<div id="removeImage(StyleRole)">
			<h3>bool removeImage(StyleRole imageRole);</h3>
		</div>
		<p>Remove a image mapped by integer imageRole.</p>
		<div id="image(StyleRole)">
			<h3>BImage* image(StyleRole imageRole) const;</h3>
		</div>
		<div id="setIcon(StyleRole, const BString&)">
			<h3>bool setIcon(StyleRole iconRole, const BString& fileName);</h3>
		</div>
		<div id="setIcon(StyleRole, BIcon*)">
			<h3>bool setIcon(StyleRole iconRole, BIcon* icon);</h3>
		</div>
		<div id="removeIcon(StyleRole)">
			<h3>bool removeIcon(StyleRole iconRole);</h3>
		</div>
		<div id="icon(StyleRole)">
			<h3>BIcon* icon(StyleRole iconRole) const;</h3>
		</div>
		<div id="setTrans(const BString&, const BString&)">
			<h3>bool setTrans(const BString& word, const BString& trans);</h3>
			<p>Setup a trans map of word and trans. Text can be translated by method trans().</p>
		</div>
		<div id="removeTrans(const BString&)">
			<h3>bool removeTrans(const BString& word);</h3>
		</div>
		<div id="trans(const BString&, BString&)">
			<h3>bool trans(const BString& text, BString& output) const;</h3>
			<p>Translate text to ouput word by word. This is very simple way to translate UI.</p>
		</div>
		<div id="setColor(const BString&, BByte, BByte, BByte,BByte)">
			<h3>bool setColor(const BString& colorName, BByte r, BByte g, BByte b, BByte a = 255);</h3>
		</div>
		<div id="setColor(const BString&, const BColor&)">
			<h3>bool setColor(const BString& colorName, const BColor& color);</h3>
		</div>
		<div id="removeColor(const BString&)">
			<h3>bool removeColor(const BString& colorName);</h3>
		</div>
		<div id="color(const BString&)">
			<h3>const BColor& color(const BString& colorName) const;</h3>
		</div>
		<div id="setImage(const BString&, const BString&)">
			<h3>bool setImage(const BString& imageName, const BString& fileName);</h3>
		</div>
		<div id="setImage(const BString&, BImage*)">
			<h3>bool setImage(const BString& imageName, BImage* image);</h3>
		</div>
		<div id="removeImage(const BString&)">
			<h3>bool removeImage(const BString& imageName);</h3>
		</div>
		<div id="image(const BString&)">
			<h3>BImage* image(const BString& imageName) const;</h3>
		</div>
		<div id="setIcon(const BString&, const BString&)">
			<h3>bool setIcon(const BString& iconName, const BString& fileName);</h3>
		</div>
		<div id="setIcon(const BString&, BIcon*)">
			<h3>bool setIcon(const BString& iconName, BIcon* icon);</h3>
		</div>
		<div id="removeIcon(const BString&)">
			<h3>bool removeIcon(const BString& iconName);</h3>
		</div>
		<div id="icon(const BString&)">
			<h3>BIcon* icon(const BString& iconName) const;</h3>
		</div>
		<div id="clearFrames()">
			<h3>bool clearFrames();</h3>
		</div>
		<div id="clearColors()">
			<h3>bool clearColors();</h3>
		</div>
		<div id="clearImages()">
			<h3>void clearImages();</h3>
		</div>
		<div id="clearIcons()">
			<h3>void clearIcons();</h3>
		</div>
	</body>
</html>